export function getMessageList(data) {
  return window.fetch({
    method: 'POST',
    url: '/message/list',
    data
    // data: {
    //   pageNo: options.pageNum || 1,
    //   pageSize: options.pageSize || 10
    // }
  })
}

export function setMessageState(options, ids) {
  return window.fetch({
    method: 'POST',
    url: '/message/handling',
    data: {
      pageNo: options.pageNum,
      pageSize: options.pageSize || 10,
      ids: ids
    }
  })
}

export function receivesMessage() {
  return window.fetch({
    method: 'POST',
    url: '/message/list/unread'
  })
}

export function messageCount() {
  return window.fetch({
    method: 'POST',
    url: '/message/unread/count'
  })
}

export function getMessageUnread() {
  return window.fetch({
    method: 'POST',
    url: '/message/list/new/unread'
  })
}

//一键标记全部 
export function clearMessageAll() {
  return window.fetch({
    method: 'POST',
    url: '/message/clearmessage'
  })
}
